package com.zxy.barometer.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 周徐阳
 * @since 2019-07-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zxy_city")
@ApiModel(value = "City对象", description = "")
public class City extends Model<City> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "跳转地址")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "城市编码")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "城市名称")
    @TableField("city")
    private String city;

    @ApiModelProperty(value = "省份")
    @TableField("province")
    private String province;

    @ApiModelProperty(value = "状态")
    @TableField("status")
    private Integer status = 1;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Long createTime = System.currentTimeMillis() / 1000L;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
